<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <meta name="description" content="U联赛是中国大学生" />
    <meta name="Keyword" content="U联赛，大学生篮球联赛，大学篮球，篮球联赛" />
<title>比赛赛程</title>
<link rel="stylesheet" type="text/css" href="../../../admin/site/common/css/global.css" />
<script type="text/javascript" src="../../../admin/site/common/js/jquery-1.11.1.min.js"></script>

</head>
<body>
	<div class="page">
		<div class="toper">
		</div><!--顶部广告banner-->
		<div class="header" id="header">
			<input id="sessionWeixin" type="hidden" th:value="${session.indexWeixin}"/>
			<input id="sessionFans" type="hidden" th:value="${session.indexFans}"/>
			<input id="sessionUser" type="hidden" th:value="${session.user==null?'1':'2'}"/>
			<input id="sessionUserName" type="hidden" th:if="${session.user!=null &amp;&amp; session.user.userName != null}" th:value="${session.user.userName}"/>		
		</div><!--复合导航栏-->
		<div class="bodymain matchmain">
			<div class="bdsharebuttonbox quicklink" id="fenxiang">
				<!-- 此处分享代码 -->
			</div>
			<div class="alltitle">
				<div class="atlabel">赛程
				</div>
				<div class="atblank">
				</div>
			</div>
			<div class="greynav">
				<div class="sellabel sellabellight">赛季:
				</div>
				<div class="selone">
					<div class="sellight" id="_season" value="">请选择</div>
					<ul class="selul selulight" >
						<li th:each="season:${season}" th:value="${season.id}" th:text="${season.name}"></li>
					</ul>
				</div>
				<div class="sellabel sellabellight">赛区:
				</div>
				<div class="selone">
					<div class="sellight"  id="_zone" value="">请选择</div>
					<ul class="selul selulight">
						<li th:each="zone:${zone}" 
		            		th:value="${zone.id}" th:text="${zone.name}" class = "zoneId"></li>
					</ul>
				</div>
				<div class="sellabel sellabellight">学校:
				</div>
				<div class="selone">
					<div class="sellight sellong" id="_school" value="">请选择</div>
					<ul class="selul selulight"  id="schoolUi">
					</ul>
				</div>
				<div class="sellabel sellabellight">球队:
				</div>
				<div class="selone">
					<div class="sellight" id="_team" value="">请选择</div>
					<ul class="selul selulight" id="teamUi">
						<li></li>
					</ul>
				</div>
				<div class="sellabel sellabellight">日期:
				</div>
				<div class="selone sellast">
					 <input type="text" class="time-link-input sellighttime" readonly="readonly" name="startTime" id="s_time" 
							    		onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
							    <span>至</span>
							    <input type="text" class="time-link-input sellighttime" readonly="readonly" name="endTime" id="e_time" 
							    		onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
				</div>
				<input type="hidden" id="seasonId" th:value="${seasonId}"/>
				<input type="hidden" id="zoneId" th:value="${zoneId}"/>
				<input type="hidden" id="schoolId" th:value="${schoolId}"/>
				<input type="hidden" id="teamId" th:value="${teamId}"/>
				<input type="hidden" id="start_time" th:value="${start_time}"/>
				<input type="hidden" id="end_time" th:value="${end_time}"/>
				<button class="red-btn match-search">查询</button>
			</div>
			<div class="match-block">
				<div class="match-high match-yusai">预赛</div>
				<div class="match-left">
					<table class="tablenav matchl-table">
						<thead>
							<tr>
								<td width="145px">日期</td> 
								<td width="44px">时间</td>
								<td width="131px">对阵</td>
								<td width="116px">校区</td>
								<td width="15px">场地</td>
								<td width="74px">成绩</td>
							</tr>
						</thead>
					</table>
					<div class="match-uc">
				<div  th:each="date,dateindex:${dateList}" class="match_div">
						<input type="hidden" th:name="${date.dateCount}"/>
						<table class="tablenav matchl-table">
							<tbody>
								<tr th:each="match,index:${matchList}" th:name="${index.index}">
									<td width="145px" th:if="${match.date == date.date }" th:name="${index.index}" th:text="${match.date}"></td>
									<td width="44px" th:if="${match.date == date.date }" th:text="${match.time}"></td>
									<td width="131px" th:if="${match.date == date.date }">
										<span th:text="${match.teamGroupName}"></span>-<span th:text="${match.teamGroupName2}"></span>
									</td>	
									<td width="116px" th:if="${match.date == date.date}" th:text="${match.schoolName}">敬业中学</td>
									<td width="15px" th:if="${match.date == date.date}" th:text="${match.site}">1号</td>
									<td width="74px" th:if="${match.date == date.date}">
										<span th:if="${match.teamScore != null and match.teamScore.toString() != '' and match.teamTwoScore != null and match.teamTwoScore.toString() != ''}">
											<span th:text="${match.teamScore}"></span>:<span th:text="${match.teamTwoScore}"></span>
										</span>
									</td> 
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				</div>
				<div class="match-right">
					<div th:each="group:${groupList}">
					<div class="match-rhigh" th:text="${group.name}">A组</div>
						<table class="tablenav matchr-table">
							<thead>
								<tr>
									<td>序号</td>
									<td>队伍</td>
									<td>场数</td>
									<td>胜负</td>
									<td>积分</td>
								</tr>
							</thead>
							<tbody>
								<tr th:each="teamInfo:${teamInfoList}">
									<td th:if="${teamInfo.groupId == group.id}" th:text="${teamInfo.number}">1</td>
									<td th:if="${teamInfo.groupId == group.id}" th:text="${teamInfo.teamName}">上海交大经管队</td>
									<td th:if="${teamInfo.groupId == group.id}" th:text="${teamInfo.comCount}">3</td>
									<td th:if="${teamInfo.groupId == group.id}">
										<span  th:text="${teamInfo.winCount}"></span>/<span  th:text="${teamInfo.loseCount}"></span>
									</td>
									<td th:if="${teamInfo.groupId == group.id}" th:text="${teamInfo.integration}">0</td>
								</tr>
							</tbody>
						</table>
					</div>
					<br/>
				</div>
			</div>
			<div class="match-block">
				<div class="match-high match-juesai">淘汰赛</div>
				<img th:if="${eliminateImg != null}" th:src="${eliminateImg.eliminateImg}" />
			</div>
			<div class="mainbottomblank">
			</div>
		</div><!--赛程页面-->
		<div class="footer  unblanfoot" id="footer" th:utext="${session.indexFooter}">
			
		</div><!--页面底部-->	
	</div>
</body>
<script type="text/javascript" src="../../../admin/ace/js/fuelux/fuelux.spinner.min.js"></script>
<script type="text/javascript" src="../../../admin/ace/js/ace-elements.min.js"></script>
<script type="text/javascript" src="../../../admin/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="../../../admin/site/common/js/header.js"></script>
<script type="text/javascript" src="../../../admin/site/common/js/mach_querySelect.js"></script>
<script type="text/javascript">
		$(function(){
			$('.match_div').each(function(i,val){
				var _rowspan = $(val).find("input").attr('name');
				var _td = $(val).find("td:first");
				_td.attr('rowspan',_rowspan);
				_td.parent().siblings().find("td:first[name!=0]").remove();
				//$(val).find("td[name !=0]").remove();
			});
			$("#nav-match").attr("class","nav-clickon");
			$('.selul li').hover(function(){$(this).addClass('hovon')},function(){$(this).removeClass('hovon')});
			$('.selul li').on('click',function(){
				$(this).parent().slideToggle('fast').parent().find('.sellight').text($(this).text())
				$(this).parent().prev(".sellight").attr('value',$(this).attr('value'));
			});
			$('.sellight').on('click',function(){$(this).next().slideToggle('fast')});
			if($(".match_div").length > 0){
				$('.match-left').show();
				$('.match-yusai').show();
			}else{
				$('.match-left').hide();
				$('.match-yusai').hide();
			}
			if($('.match-rhigh').length > 0){
				$('.match-right').show();
				$('.match-juesai').show();
			}else{
				$('.match-right').hide();
				$('.match-juesai').hide();
			}
		});
</script>
</html>
